package com.xydtech.ecard.busi.service;

import com.xydtech.common.core.domain.entity.SysDept;
import com.xydtech.ecard.busi.domain.EcardApiEcardBusiReservation;
import com.xydtech.ecard.user.domain.EcardApiEcardRegistInfo;

import java.util.List;

/**
 * 业务预约登记Service接口
 *
 * @author Daniel
 * @date 2021-09-06
 */
public interface IEcardApiEcardBusiReservationService {
    /**
     * 电子名片-业务预约登记-查询已经提交过的未处理的产品预约
     * @param busiReservation
     * @return
     */
    List<EcardApiEcardBusiReservation> getSubmitBusiReservation(EcardApiEcardBusiReservation busiReservation, String salt);

    /**
     * 电子名片-业务预约登记-预约提交
     * @param busiReservation
     * @return
     */
    int submitReservation(EcardApiEcardBusiReservation busiReservation, String salt);

    /**
     * 电子名片-业务预约登记-获取客户已经预约过的第一条业务
     * @param currentUserId
     * @return
     */
    List<EcardApiEcardBusiReservation> getCustFirstReservation(String currentUserId, Long deptId, String salt);

    /**
     * 电子名片-业务预约登记-获取客户已经预约过的业务
     * @param currentUserId
     * @return
     */
    List<EcardApiEcardBusiReservation> getCustReservationList(String currentUserId, Long deptId, String salt);

    /**
     * 电子名片-业务预约登记-获取客户经理的业务预约列表
     * @param userId
     * @return
     */
    List<EcardApiEcardBusiReservation> getReservationForManager(String userId, String sts, String salt);

    /**
     * 电子名片-首页-根据擅长业务查询对应的客户经理
     * @param adeptPrdType
     * @param deptList
     * @return
     */
    List<EcardApiEcardRegistInfo> getCustomerManagerByAdeptPrdType(String adeptPrdType, List<SysDept> deptList, Long parentDeptId);

    /**
     * 根据ID查询预约详情
     * @param resId
     * @return
     */
    EcardApiEcardBusiReservation getReservationDetail(String resId, String salt);

    /**
     * 电子名片-业务预约登记-对预约业务无意向
     * @param resId
     * @return
     */
    int noIntentionForReservation(String resId);

    /**
     * 电子名片-业务预约登记-受理确认
     * @param ecardBusiReservation
     * @return
     */
    int acceptReservation(EcardApiEcardBusiReservation ecardBusiReservation);

    /**
     * 电子名片-业务预约登记-上传业务办理凭证（更新文件路径到预约业务中）
     * @param resId
     * @param certImageFilePath
     * @return
     */
    int updateReservationCertImage(String resId, String certImageFilePath);

    /**
     * 电子名片-业务预约登记-业务转交
     * @param resId
     * @param currentUserId
     * @param transToRegistId
     * @return
     */
    int transReservation(String resId, String currentUserId, String transToRegistId);

    /**
     * 更新业务预约的报告地址
     * @param resId
     * @param reportUrl
     * @return
     */
    int updateReportUrl(String resId, String reportUrl);
    /**
     * 修改业务预约登记
     *
     * @param ecardApiEcardBusiReservation 业务预约登记
     * @return 结果
     */
    public int updateEcardApiEcardBusiReservation(EcardApiEcardBusiReservation ecardApiEcardBusiReservation, String salt);
    /**
     * 更新PDF报告地址
     * @author yjs
     * @date 2022/12/7 17:41
     */
    public int updatePdfReport(String pdfKey,String pdfVal,String resId);
}
